<template>
  <div class="login">
    <Header title="登录页面"></Header>
    <div>
      <h3>登录页面</h3>
      <button @click="toCart">登录</button>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loginstate: true
    };
  },
  methods: {
    toCart() {
      this.$router.push("/cart");
      localStorage.setItem("keys", JSON.stringify(this.loginstate));
    }
  }
};
</script>

<style scoped>
.login {
  width: 100%;
  text-align: center;
}
</style>